<template>
	<view class="t-id-card">
		<view class="tic-base">
			<view class="tic-base-left">
				<image src="../../static/imgs/piccbg.png"></image>
			</view>
			<view class="tic-base-right">
				<view class="tic-base-right-name">陈超</view>
				<view class="tic-base-right-item">
					<image src="../../static/imgs/phone.png"></image>
					<text>18615538792</text>
				</view>
				<view class="tic-base-right-item">
					<image src="../../static/imgs/calendar.png"></image>
					<text>1995-05-08</text>
				</view>
				<view class="tic-base-right-item">
					<image src="../../static/imgs/homeLocal.png"></image>
					<text>山东省济南市</text>
				</view>
			</view>
		</view>
		<view class="tic-works">
			<view class="tic-works-title t-base-title">工作能力</view>
			<view class="tic-works-desc">本人从事计算机软件行业开发，拥有多年开发经验，熟悉Java、Vue相关知识基础框架，品格优秀，有能力独自完成项目的开发设计。</view>
		</view>
		<view v-if="false" class="tic-certs t-base-card">
			<view class="tic-certs-title t-base-title">证书证件</view>
			<view class="tic-certs-desc">功能开发中，敬请期待。</view>
		</view>
		<view v-if="false" class="tic-auth t-base-card">
			<view class="tic-auth-title t-base-title">平台认证</view>
			<view class="tic-auth-desc">功能开发中，敬请期待。</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'cards',
		data() {
			return {
				userCardInfo: {},
			}
		},
		onLoad() {
			this.loadUserCardInfo();
		},
		methods: {
			loadUserCardInfo() {
				//发起网络请求
				this.$http.get({
					url: this.$apis.getUserIdCardInfo,
					data: {},
				}).then(res => {
					if (res.code === 200) {
						if (res.data) {
							this.userCardInfo = res.data;
						} else {
							// 跳转完善信息页面
						}
					}
				}).catch(err => {
					console.log('调用接口失败：', err);
				});
			}
		}
	}
</script>

<style lang="scss">
	
	.t-id-card {
		background-color: #f1f1f1;
		height: 100vh;
		padding: 20rpx;
		box-sizing: border-box;
		overflow-y: auto;
		
		.tic-base {
			display: flex;
			background-color: #ffffff;
			padding: 30rpx;
			border-radius: 20rpx;
			
			&-left {
				
				> image {
					width: 160rpx;
					height: 200rpx;
					border-radius: 20rpx;
					// box-shadow: 0 0 4rpx 4rpx rgba(0, 0, 0, 0.1);
				}
			}
			
			&-right {
				margin-left: 20rpx;
				
				&-name {
					font-size: 32rpx;
					font-weight: 600;
					line-height: 50rpx;
					margin-bottom: 20rpx;
				}
				
				&-item {
					display: flex;
					align-items: center;
					margin-bottom: 8rpx;
					
					> image {
						width: 30rpx;
						height: 30rpx;
					}
					
					> text {
						font-size: 28rpx;
						color: #999999;
						margin-left: 10rpx;
					}
				}
			}
			
		}
		
		.tic-works {
			background-color: #ffffff;
			padding: 30rpx;
			border-radius: 20rpx;
			margin-top: 20rpx;
			
			&-title {
				font-size: 32rpx;
				color: #333333;
			}
			
			&-desc {
				margin-top: 20rpx;
				font-size: 28rpx;
				color: #666666;
				text-indent: 2ch;
			}
		}
		
		.tic-certs {
			margin-top: 20rpx;
		}
		
		.tic-auth {
			margin-top: 20rpx;
		}
		
	}
</style>